/* Standard includes */
#include <stdio.h>
#include <stdlib.h>

/* EFL includes */
#include <Etk.h>

#include "init.h"
#include "main_gui.h"

/* Main here */
int main(int argc, char **argv) {

    if (!etk_init(argc, argv)) {
        fprintf(stderr, "Could not initialize Etk. Exiting...\n");
        return 1;
    }

    ecore_file_init();

    /* Initizlize and starts E-Mail */
    if (app_init()) {
        build_main_gui();
    }

    /* The main loop */	
    etk_main();

    /* Freeing main_gui */
    free(main_gui);

    /* Libraries cleanup */
    etk_shutdown();
    syl_save_all_state();
    syl_cleanup();

    return 0;
}
